package github.sf.fw.tools;

public class AdvanceObjectException extends RuntimeException {
    private final ErrorCode errorCode;


    public AdvanceObjectException(ErrorCode errorCode, String msg) {
        super(msg);
        this.errorCode = errorCode;
    }

    public AdvanceObjectException(ErrorCode errorCode, Throwable e) {
        super(e);
        this.errorCode = errorCode;
    }

    public static AdvanceObjectException asException(ErrorCode errorCode, String format) {
        return new AdvanceObjectException(errorCode, format);
    }
}
